/*
 * jQuery Dropdown: A simple dropdown plugin
 *
 * Contribute: https://github.com/claviska/jquery-dropdown
 *
 * @license: MIT license: http://opensource.org/licenses/MIT
 *
 */

$jq-dropdown-bg: white !default
$jq-dropdown-text: inherit !default
$jq-dropdown-hover-bg: #f2f2f2 !default
$jq-dropdown-hover-text: inherit !default
$jq-dropdown-border: #ddd !default
$jq-dropdown-divider: #e5e5e5 !default
$jq-dropdown-border-radius: 4px !default

.jq-dropdown
    position: absolute
    z-index: 1039
    display: none
    .jq-dropdown-menu,
    .jq-dropdown-panel
        min-width: 160px
        max-width: 360px
        list-style: none
        background: $jq-dropdown-bg
        border: solid 1px $jq-dropdown-border
        border-radius: $jq-dropdown-border-radius
        box-shadow: 0 5px 10px rgba(0, 0, 0, .2)
        overflow: visible
        padding: 4px 0
        margin: 0

    .jq-dropdown-panel
        padding: 10px

    &.jq-dropdown-tip
        margin-top: 8px
        &:before
            position: absolute
            top: -6px
            left: 9px
            content: ''
            border-left: 7px solid transparent
            border-right: 7px solid transparent
            border-bottom: 7px solid $jq-dropdown-border
            display: inline-block

        &:after
            position: absolute
            top: -5px
            left: 10px
            content: ''
            border-left: 6px solid transparent
            border-right: 6px solid transparent
            border-bottom: 6px solid $jq-dropdown-bg
            display: inline-block

        &.jq-dropdown-anchor-right
            &:before
                left: auto
                right: 9px

            &:after
                left: auto
                right: 10px

    &.jq-dropdown-scroll
        .jq-dropdown-menu,
        .jq-dropdown-panel
            max-height: 180px
            overflow: auto

    .jq-dropdown-menu
        li
            list-style: none
            padding: 0 0
            text-indent: 0
            margin: 0
            line-height: 18px

        li > a,
        label
            display: block
            color: $jq-dropdown-text
            text-decoration: none
            line-height: 18px
            padding: 3px 15px
            margin: 0
            white-space: nowrap
            &:hover
                background-color: $jq-dropdown-hover-bg
                color: $jq-dropdown-hover-text
                cursor: pointer

        .jq-dropdown-divider
            font-size: 1px
            border-top: solid 1px $jq-dropdown-divider
            padding: 0
            margin: 5px 0
